Think, explore, & write about what the co-evolutionary interaction between newts & snakes with different genetic architectures (GAs, combination of mutation rate & mutation effect size) under different cost settings. This markdown investigates the phenotype spatial correlation as the cost of a high phenotype changes (for both newts and snakes). I also plan on changing the interaction rate (but want to look at the math/ feasibility of it).
How does cost size impact the spatial correlation of newt and snake phenotypes?
I created a simulation study to observe the co-evolutionary outcome of the newt-snake interaction with different genetic architectures (GAs) in a spatial setting.
Landscape: A tall map!: 35*4 H, 35 W
GA1 experiment values:
I tested different cost values:
The higher a cost value the less impacting on the phenotype it is.
Each GA combination, trial, and cost has its own msprime simulation. There is only 1 trial per cost value.
## All cor, lit, and cost files exist!
## This program will now end!
In this first section I look at the entire populations mean phenotype for both snakes (blue) and newts (red). The difference between mean snake and mean newt phenotype is shown on the black line. For each GA combination there are 5 sets of lines (5 red, blue, $ black). Each shape at the set of lines corresponds to the cost value, which 50 = circle, 100 = triangle, 150 = square, 200 = plus, and 250 = square with an x. The higher the cost values the less costly a high phenotype for the species is. The cost values range from 50 (more costly) to 250 (less costly).
The first things that I saw was how high the phenotypes got when the cost value when up. The phenotype seems to reach an optimum spot (an equilibrium) depending on what the cost value is for most of the GA combinations. For GA combinations that had one species with a low mutational variance the mean phenotype of the population did not get very high. It might take the simulation a bit more time to reach an equilibrium mean phenotype. When there is room for the phenotype to change newts and snakes mean phenotype costly follow each other.
Nest, I observe the interaction between the population size of newts and snakes and the mean phenotype difference (snakes-newts). Here, newt population size is on the x-axis while snake population size is on the y-axis. Blue points occur when the mean snake phenotype is higher and red points occur when the newt mean phenotype is larger. I added the cost values as shapes.
It seems like each cost value clusters together with some overlapping other cost values or completely different form others. For example when the GA combination has a high mutational variance for both newts and snakes (K, L, O, P) the cost values all overlap. When at least one of the species has a lower mutational variance there is more of a range in the results (different population sizes & mean phenotype).
Phenotype Spatial Correlation of 30,000 Generations
This section examines the spatial correlation of newts and snakes local phenotype for the different cost values. Each cost values has its own boxplot color. There are five boxplots per GA combination. This figure contains the correlation results for the entire length of the simulations.
There is no spatial phenotype correlation pattern between the cost value and the GA combination. Each of these boxplots are an identical simulation so there is some randomness between the differ cost values within the GA combination. The spatial phenotype correlation seems very random. The only GA where it might not be random is when both newts and snakes have a low mutational variance (the correlation seems to be decreasing).
In order to understand how spatial correlations are changing with time, I took 5,000 generation time slices to look at the correlation values of all five cost values. Each color is a different cost value per GA combination.
The spatial phenotype correlation between newts and snakes seems to jump around between time slices. There is no clear direction the boxplots are moving in. Sometimes the correlation is negative, near zero or positive. The spatial correlation seems random.
Next, we will examine three randomly chosen GA combinations with all of the different cost values from this experiment. Time (in generations) in on the x-axis and both mean phenotype and phenotype spatial correlation in on the y-axis (with cost values indicated by shape and color). Newt whole population mean phenotype is red, while snake mean phenotype is blue. The multi-colored lines are the phenotype spatial correlation for a specific cost value.
Again, the spatial correlation of newt and snake phenotypes seems very random. Even when both newt and snake mean phenotypes are going up the spatial correlation fluctuates from positive to negative. No one cost value makes the spatial correlation larger or smaller (all cost values have correlations that overlap with none having a significant greater variance).
Next, we will examine three randomly chosen GA combinations with all of the different cost values from this experiment. Time (in generations) in on the x-axis and both population size and population size spatial correlation in on the y-axis (with cost values indicated by shape and color). Newt whole population population size is red, while snake population size is blue. The multi-colored lines are the population size spatial correlation for a specific cost value.
There might be a relationship between cost and spatial population size correlations. First, I would like to note that these values should be negatively correlated, but sense I did not set the per-area true the edges and corners are smaller throwing my correlation values off. I think that the higher the cost value the more negatively correlated the population size between newts and snakes. If one species has a higher phenotype there would be less of the other species. This would be occurring in different areas of my simulation creating a stronger negative correlation. Or there is something else occurring that I am not currently taking into account.
Now, I will take a glace at the how the population size of newts and snakes as well as the mean phenotype difference between snake and newts changed between the different cost values. I will look at my simulation results from the beginning and end of the simulation. Color indicate the mean phenotype difference (blue = snakes have a higher mean phenotype, red = newts have a higher mean phenotype).
All of the beginning figures look very similar. The population size of newts and snakes starts out small and then grows. Sometimes the snake population size and mean phenotype gets larger and other times the newt population size nd mean phenotype gets larger. Near the end of the simulation (last 5,000 generations) there are differences between the different cost values. I found as you increase the cost the larger the difference in newt and snake population size becomes between the different GA combinations. I can see this by witnessing the clusters getting smaller, but really the x & y axis are really just getting larger. When the cost value was low the population sizes and the difference between mean phenotype between GA combinations were close. As the cost value went up, the difference between snake and newt mean phenotype increased.
In the summary section, I try to come up with a way to show how different GA combinations can change the simulations results. In all of these plots snakes GA is represented by color and newt GA is represented by shape. Shape size represents the cost value (the larger the cost value the larger the shape). There 16 color-shape combinations (with 4 repeats for trials). There are two sets of plots: 1) newt by snake population size, 2) phenotype difference by snake population size. These are whole population calculations and are done for the least 5,000 generations.
There seems to be some pattern between the different GA combinations and cost values. Previously I noted, that there is both shape and color separation, and that intermediate GA do better (1e-09_0.05 & 1e-10_0.5) in a co-evolutionary arms race. Here that is still true but it is more difficult to see when I change the cost values. A higher cost value increases the difference in population size and phenotype difference, it exaggerates the difference. When the cost values and the mutational variance of at lease one of the species are high they cluster (both newts and snakes have close phenotypes and population sizes, snakes tend to always have a slightly larger population size and newts are slightly more toxic). If given more time, I think there would be greater separation of colors, shapes, and cost values.
In the heatmap plots each GA combination and cost is presented by combining newt GA in the x-axis to snake GA and cost value in the y-axis. There are two types of heatmap plots shown below. One shows the average snake population size for a time chunk with darker colors indicating a smaller snake population and lighter colors indicating a larger snake population. The other heatmap shows the average difference between snake and newt mean phenotype (red=newts had a higher phenotype, blue=snakes had a higher phenotype). I fist look at early and then late simulation data.
There is some cool population size and phenotype variation between different cost values within the same GA combination. The lowest cost value was always more neutral. As the cost value increased both the snake population size and mean phenotype diverged to either end. Sometimes it was not the highest cost values that resulted in the most dramatic out come. I saw more dramatic outcomes when the mutation variance was lower. My summary for this experiment is that increasing the cost value will only highlight the differences caused by the GA combinations. The ending results will remain the same, but may take longer to reach.
This last section looks at the local population phenotype for newts and snakes (circles and squares). I plot the results from generation 9981 for the GA combination 1e-10_0.5_1e-10_0.5_0. Color represents both toxicity and resistance. The sub plot is the phenotype for the newt by the phenotype for the snake, color indicates the location on the map (red=corner, green=edge, blue=middle).
## [1] 0.1944708
## [1] 0.07400547
## [1] 0.1270281
## [1] 0.04442127
## [1] 0.2344528